#include "precompile.h"

#include "NewDocumentCommand.h"
#include "document/Types.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

NewDocumentCommand::NewDocumentCommand()
{
}

NewDocumentCommand::~NewDocumentCommand()
{
}

void NewDocumentCommand::Execute()
{
	IDocument* document = GetApplication()->GetWorkspace()->NewDocument(designDocument,
																																			singlePageTypeset,
																																			leftPageBinding,
																																			4,
																																			297.0f,
																																			210.0f,
																																			25.3f,
																																			25.3f,
																																			25.3f,
																																			25.3f);
	if(!document)
		throw ApplicationException(L"Failed to create document object");
}